package com.test.design_pattern.decorator;

public class DecoratorDemo {

    static void print(Coffee coffee){
        System.out.println("花费了" + coffee.getCost());
    }

    public static void main(String[] args) {
        Coffee coffee = new SimpleCoffee();
        print(coffee);

        Coffee milk = new MilkCoffee(coffee);
        print(milk);


    }
}